home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Magazine / PC2Amiga / Samba / docs / textdocs / DOMAIN_MEMBER.txt < prev    next >
Text File  |  2000-04-25  |  6KB  |  155 lines

  1. !==
  2. !== DOMAIN_MEMBER.txt for Samba release 2.0.7 26 Apr 2000
  3. !==
  4.  
  5. TITLE INFORMATION: Joining an NT Domain with Samba 2.0 
  6. AUTHOR INFORMATION: Jeremy Allison, Samba Team 
  7. DATE INFORMATION: 7th October 1999 
  8.  
  9. Contents 
  10.  
  11. Joining an NT Domain with Samba 2.0 
  12. ----------------------------------- 
  13.  
  14. In order for a Samba-2 server to join an NT domain, you must first add
  15. the NetBIOS name of the Samba server to the NT domain on the PDC using
  16. Server Manager for Domains.  This creates the machine account in the
  17. domain (PDC) SAM. Note that you should add the Samba server as a "Windows
  18. NT Workstation or Server", NOT as a Primary or backup domain controller.
  19.  
  20. Assume you have a Samba-2 server with a NetBIOS name of SERV1 and are
  21. joining an NT domain called DOM, which has a PDC with a NetBIOS name
  22. of DOMPDC and two backup domain controllers with NetBIOS names DOMBDC1
  23. and DOMBDC2.
  24.  
  25. In order to join the domain, first stop all Samba daemons and run the
  26. command
  27.  
  28. smbpasswd -j DOM -r DOMPDC
  29.  
  30. as we are joining the domain DOM and the PDC for that domain (the only
  31. machine that has write access to the domain SAM database) is DOMPDC. If this is
  32. successful you will see the message:
  33.  
  34. smbpasswd: Joined domain DOM.
  35.  
  36. in your terminal window. See the smbpasswd
  37. man page for more details.
  38.  
  39. This command goes through the machine account password change
  40. protocol, then writes the new (random) machine account password for
  41. this Samba server into a file in the same directory in which an
  42. smbpasswd file would be stored - normally :
  43.  
  44. /usr/local/samba/private
  45.  
  46. The filename looks like this:
  47.  
  48. <NT DOMAIN NAME>.<Samba Server Name>.mac
  49.  
  50. The .mac suffix stands for machine account password file. So in
  51. our example above, the file would be called:
  52.  
  53. DOM.SERV1.mac
  54.  
  55. This file is created and owned by root and is not readable by any
  56. other user. It is the key to the domain-level security for your
  57. system, and should be treated as carefully as a shadow password file.
  58.  
  59. Now, before restarting the Samba daemons you must edit your
  60. smb.conf file to tell Samba it should now
  61. use domain security.
  62.  
  63. Change (or add) your 
  64.  
  65. "security ="
  66.  
  67. line in the [global] section of your
  68. smb.conf to read:
  69.  
  70. security = domain
  71.  
  72. Next change the 
  73.  
  74. "workgroup ="
  75.  
  76. line in the [global] section to read: 
  77.  
  78. workgroup = DOM
  79.  
  80. as this is the name of the domain we are joining. 
  81.  
  82. You must also have the parameter "encrypt passwords"
  83. set to "yes" in order for your users to authenticate to the
  84. NT PDC.
  85.  
  86. Finally, add (or modify) a:
  87.  
  88. "password server ="
  89.  
  90. line in the [global] section to read: 
  91.  
  92. password server = DOMPDC DOMBDC1 DOMBDC2
  93.  
  94. These are the primary and backup domain controllers Samba will attempt
  95. to contact in order to authenticate users. Samba will try to contact
  96. each of these servers in order, so you may want to rearrange this list
  97. in order to spread out the authentication load among domain
  98. controllers.
  99.  
  100. Alternatively, if you want smbd to automatically determine the
  101. list of Domain controllers to use for authentication, you may set this line to be :
  102.  
  103. password server = *
  104.  
  105. This method, which is new in Samba 2.0.6 and above, allows Samba
  106. to use exactly the same mechanism that NT does. This method either broadcasts or
  107. uses a WINS database in order to find domain controllers to
  108. authenticate against.
  109.  
  110. Finally, restart your Samba daemons and get ready for clients to begin
  111. using domain security!
  112.  
  113. Why is this better than security = server? 
  114. ------------------------------------------ 
  115.  
  116. Currently, domain security in Samba doesn't free you from having to
  117. create local Unix users to represent the users attaching to your
  118. server. This means that if domain user DOM\fred attaches to your
  119. domain security Samba server, there needs to be a local Unix user fred
  120. to represent that user in the Unix filesystem. This is very similar to
  121. the older Samba security mode "security=server", where Samba would pass
  122. through the authentication request to a Windows NT server in the same
  123. way as a Windows 95 or Windows 98 server would.
  124.  
  125. The advantage to domain-level security is that the authentication in
  126. domain-level security is passed down the authenticated RPC channel in
  127. exactly the same way that an NT server would do it. This means Samba
  128. servers now participate in domain trust relationships in exactly the
  129. same way NT servers do (i.e., you can add Samba servers into a
  130. resource domain and have the authentication passed on from a resource
  131. domain PDC to an account domain PDC.
  132.  
  133. In addition, with "security=server" every Samba daemon on a
  134. server has to keep a connection open to the authenticating server for
  135. as long as that daemon lasts. This can drain the connection resources
  136. on a Microsoft NT server and cause it to run out of available
  137. connections. With "security =domain", however, the Samba
  138. daemons connect to the PDC/BDC only for as long as is necessary to
  139. authenticate the user, and then drop the connection, thus conserving
  140. PDC connection resources.
  141.  
  142. And finally, acting in the same manner as an NT server authenticating
  143. to a PDC means that as part of the authentication reply, the Samba
  144. server gets the user identification information such as the user SID,
  145. the list of NT groups the user belongs to, etc. All this information
  146. will allow Samba to be extended in the future into a mode the
  147. developers currently call appliance mode. In this mode, no local Unix
  148. users will be necessary, and Samba will generate Unix uids and gids
  149. from the information passed back from the PDC when a user is
  150. authenticated, making a Samba server truly plug and play in an NT
  151. domain environment. Watch for this code soon.
  152.  
  153. NOTE: Much of the text of this document was first published in the
  154. Web magazine "LinuxWorld" as the article "Doing the NIS/NT Samba".
  155.